# Replication materials for ``Can Political Speech Foster Tolerance of Immigrants?" 
# Authors: Petra Schleiter, Margit Tavits, Dalston Ward

The files in this folder replicate all analyses in the main text and SI. Each table or figure is replicated in a single R file. The data sets used are contained in the data folder. The main data is contained in pooled.csv. Helper functions used for some of the analyses are in functions.R

The replication files were created in May 2021 with R on a 2017 13-inch MacBook Pro with a 3.5GHz Dual-Core Intel i7 processor and 16GB of memory. The below output from sessionInfo() describes the OS, R, and package versions used.

***

> sessionInfo()R version 4.0.4 (2021-02-15)Platform: x86_64-apple-darwin17.0 (64-bit)Running under: macOS Catalina 10.15.7Matrix products: defaultBLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylibLAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dyliblocale:[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:[1] stats     graphics  grDevices utils     datasets  methods   base     other attached packages: [1] texreg_1.37.5     xtable_1.8-4      cowplot_1.1.1     lfe_2.8-6         Matrix_1.3-2      patchwork_1.1.1   ggstance_0.3.5    ggplot2_3.3.3     data.table_1.14.0 here_1.0.1       loaded via a namespace (and not attached): [1] Rcpp_1.0.6       pillar_1.5.1     compiler_4.0.4   plyr_1.8.6       tools_4.0.4      digest_0.6.27    lifecycle_1.0.0  tibble_3.1.0     gtable_0.3.0     lattice_0.20-41 [11] pkgconfig_2.0.3  rlang_0.4.10     DBI_1.1.1        parallel_4.0.4   httr_1.4.2       withr_2.4.1      dplyr_1.0.5      generics_0.1.0   vctrs_0.3.7      rprojroot_2.0.2 [21] grid_4.0.4       tidyselect_1.1.0 glue_1.4.2       R6_2.5.0         fansi_0.4.2      Formula_1.2-4    purrr_0.3.4      farver_2.1.0     clipr_0.7.1      magrittr_2.0.1  [31] scales_1.1.1     ellipsis_0.3.1   assertthat_0.2.1 colorspace_2.0-0 labeling_0.4.2   sandwich_3.0-0   utf8_1.2.1       munsell_0.5.0    crayon_1.4.1     zoo_1.8-9